<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.3.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.json"};
  </script>

  <meta name="description" content="​        原文地址：https:&#x2F;&#x2F;www.bilibili.com&#x2F;video&#x2F;BV1P14y1z7WC&#x2F;?spm_id_from&#x3D;pageDriver&amp;vd_source&#x3D;2ef3411e1c045a25cc2351abaa2c3ce8 ​        https:&#x2F;&#x2F;blog.csdn.net&#x2F;m0_69251699&#x2F;article&#x2F;details&#x2F;131583713 片上">
<meta property="og:type" content="article">
<meta property="og:title" content="CAN工作原理及其HAL驱动程序">
<meta property="og:url" content="http://example.com/2023/09/17/CAN%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%8F%8A%E5%85%B6HAL%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/index.html">
<meta property="og:site_name" content="学无止境">
<meta property="og:description" content="​        原文地址：https:&#x2F;&#x2F;www.bilibili.com&#x2F;video&#x2F;BV1P14y1z7WC&#x2F;?spm_id_from&#x3D;pageDriver&amp;vd_source&#x3D;2ef3411e1c045a25cc2351abaa2c3ce8 ​        https:&#x2F;&#x2F;blog.csdn.net&#x2F;m0_69251699&#x2F;article&#x2F;details&#x2F;131583713 片上">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309092216205.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309092231253.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309101027981.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309101042748.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309101058117.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309112259838.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309112308280.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/8c2d743ba36646199cf2d1ce3f4e4f90.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20230917165824.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20230917172119.png">
<meta property="article:published_time" content="2023-09-17T09:25:34.000Z">
<meta property="article:modified_time" content="2023-09-17T09:25:34.000Z">
<meta property="article:author" content="xudonglei">
<meta property="article:tag" content="can总线">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309092216205.png">

<link rel="canonical" href="http://example.com/2023/09/17/CAN%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%8F%8A%E5%85%B6HAL%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>CAN工作原理及其HAL驱动程序 | 学无止境</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">学无止境</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Do not bb, show me the example</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2023/09/17/CAN%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%8F%8A%E5%85%B6HAL%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="xudonglei">
      <meta itemprop="description" content="搬砖 嵌入式">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="学无止境">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          CAN工作原理及其HAL驱动程序
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2023-09-17 17:25:34" itemprop="dateCreated datePublished" datetime="2023-09-17T17:25:34+08:00">2023-09-17</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F/" itemprop="url" rel="index"><span itemprop="name">嵌入式</span></a>
                </span>
            </span>

          
            <span id="/2023/09/17/CAN%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%8F%8A%E5%85%B6HAL%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/" class="post-meta-item leancloud_visitors" data-flag-title="CAN工作原理及其HAL驱动程序" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2023/09/17/CAN%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%8F%8A%E5%85%B6HAL%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2023/09/17/CAN%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%8F%8A%E5%85%B6HAL%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F/" itemprop="commentCount"></span>
    </a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>​        原文地址：<a target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV1P14y1z7WC/?spm_id_from=pageDriver&amp;vd_source=2ef3411e1c045a25cc2351abaa2c3ce8">https://www.bilibili.com/video/BV1P14y1z7WC/?spm_id_from=pageDriver&amp;vd_source=2ef3411e1c045a25cc2351abaa2c3ce8</a></p>
<p>​        <a target="_blank" rel="noopener" href="https://blog.csdn.net/m0_69251699/article/details/131583713">https://blog.csdn.net/m0_69251699/article/details/131583713</a></p>
<h3 id="片上CAN外设的功能概述"><a href="#片上CAN外设的功能概述" class="headerlink" title="片上CAN外设的功能概述"></a>片上CAN外设的功能概述</h3><p>​        stm32f4器件上有两个基本扩展can外设，我们称之为can模块，如下图所示。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309092216205.png" style="zoom:80%;">

<p>​        其中can1是带有512字节sram的主can控制器，can2无法直接访问sram存储器，是从can控制器。</p>
<p>​        每个can模块都有3个发送邮箱，每个can模块有两个FIFO接收单元，每个FIFO有3个接收邮箱。每个FIFO有独立的中断地址。</p>
<p>​        2个can模块共用28个筛选器组，<strong>筛选器组用于配置可接收ID列表或掩码，数据帧和遥控帧根据ID被筛选。只有通过筛选的帧才能进入接收邮箱</strong>。帧的筛选完全由硬件来完成，减少处理器的负担。</p>
<p>​        上面讲的只是can控制器，如果要构成一个can节点，mcu还需要外接一个can收发器芯片，实现mcu逻辑电平到can总线物理层的电平转换和控制。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309092231253.png" style="zoom:80%;">

<p>​        上图是闭环结构，开发板上的CAN通信接口电路使用SIT1050T芯片。</p>
<p>​        下面搞一个demo，我们使用开发板上的can通信电路，测试轮询模式的can通信编程。<strong>使用can测试模式中的回环功能进行自发自收的测试</strong>，<strong>设置筛选器组只接收ID为奇数的消息，使用轮询方式来接收数据</strong>。</p>
<h3 id="Cubemx配置"><a href="#Cubemx配置" class="headerlink" title="Cubemx配置"></a>Cubemx配置</h3><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309101027981.png" style="zoom:67%;">

<p>​        直接将can1启用，点击生成代码，看下stm32f4xx_hal_can.h文件有哪些函数。首先can模块的基本控制，can模块有3种主要的工作模式：初始化，正常和睡眠。硬件复位后，can模块处于睡眠模式；在初始化模式下，可以对can模块进行初始化设置；在正常模式下，可以进行数据的接收和发送。</p>
<p><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309101042748.png"></p>
<p>比如HAL_CAN_RequeseSleep函数使can模块在完成当前操作后进入睡眠模式。</p>
<h3 id="CAN模块的测试模式"><a href="#CAN模块的测试模式" class="headerlink" title="CAN模块的测试模式"></a>CAN模块的测试模式</h3><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309101058117.png" style="zoom:70%;">

<p>​        在静默模式下，can模块可以接收有效的数据帧和遥控帧，但只能发出隐性位,而不能真正发送报文。所以在静默模式下，can模块无法启动发送操作。这种模式一般用于监测总线流量。</p>
<p>​        回环模式下，can模块可以正常向总线发送数据，但不能接收总线的数据，只能接收自己发送的数据，这种模式可以用于自检测试。为了不受外部事件的影响，can内核在此模式下，不会对数据帧或遥控帧的ACK段采样，这样就可以忽略ACK错误。</p>
<p>​        回环和静默组合模式，可以用于热自检，这种模式下，can模块不能接收总线上的数据，只能接收自己发送的数据，只能向总线上发送隐性位，因而不会影响can总线。</p>
<h3 id="CAN模块发送消息相关的函数"><a href="#CAN模块发送消息相关的函数" class="headerlink" title="CAN模块发送消息相关的函数"></a>CAN模块发送消息相关的函数</h3><p><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309112259838.png"></p>
<h3 id="CAN模块消息接收相关的函数"><a href="#CAN模块消息接收相关的函数" class="headerlink" title="CAN模块消息接收相关的函数"></a>CAN模块消息接收相关的函数</h3><p><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309112308280.png"></p>
<h3 id="标识符筛选原理"><a href="#标识符筛选原理" class="headerlink" title="标识符筛选原理"></a>标识符筛选原理</h3><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/8c2d743ba36646199cf2d1ce3f4e4f90.png" style="zoom:80%;">

<p>​        发送节点是以广播的形式发送的，所有的can节点都能收到消息。数据帧和遥控帧带有标识符，标识符一般表示消息的类型。一个can节点一般只对特定的消息感兴趣，如果用软件对接收的帧ID进行判别，将消耗接收节点的大量cpu时间。</p>
<p>​        筛选器的工作主要是筛选ID的长度和筛选模式决定的。</p>
<p>​        筛选ID的长度有两种，分别是16位和31位，如下：</p>
<p>​        (1) 检查 STDID[10:0]、 EXTID[17:0]、 IDE 和 RTR 位， 一共31位。</p>
<p>​        (2) 检查STDID[10:0]、 RTR、 IDE 和 EXTID[17:15]， 一共16位。</p>
<p>​        筛选模式分两种，分别是标识列表模式和掩码模式，如下：</p>
<p>​        (1) 标识符列表模式，它把要接收报文的ID列成一个表， 要求报文ID与列表中的某一个标识符完全相同才可以接收，可以理解为白名单管理。</p>
<p>​        (2) 掩码模式，它把可接收报文ID的某几位作为列表，这几位被称为掩码， 可以把它理解成关键字搜索，只要掩码(关键字)相同，就符合要求，报文就会被保存到接收FIFO。</p>
<p>​        两种筛选模式用通俗的话来讲，标识列表模式就是把所有的ID放在一个表里，一个一个的去查，查到与标识的ID相同的报文选择接收，其他的报文不接受；掩码模式就是，对应ID的每一个位，都有一个掩码的位去决定，如下表：<br><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20230917165824.png" style="zoom:80%;"></p>
<p>当掩码是1时，就表明要接收的报文ID就必须和存储的ID一致，当掩码是0是，就是不关心要筛选的ID这一位可以是0，也可以是1。</p>
<h3 id="中断及其处理"><a href="#中断及其处理" class="headerlink" title="中断及其处理"></a>中断及其处理</h3><img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/微信截图_20230917172119.png" style="zoom:80%;">

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/can%E6%80%BB%E7%BA%BF/" rel="tag"># can总线</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2023/09/09/CAN%E6%80%BB%E7%BA%BF%E7%BB%93%E6%9E%84%E4%B8%8E%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE/" rel="prev" title="CAN总线结构与传输协议">
      <i class="fa fa-chevron-left"></i> CAN总线结构与传输协议
    </a></div>
      <div class="post-nav-item">
    <a href="/2023/09/17/free%E9%87%8A%E6%94%BE%E5%86%85%E5%AD%98%E7%9A%84%E6%97%B6%E5%80%99%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%8D%E9%9C%80%E8%A6%81%E6%8C%87%E5%AE%9A%E5%86%85%E5%AD%98%E5%A4%A7%E5%B0%8F/" rel="next" title="free释放内存的时候为什么不需要指定内存大小">
      free释放内存的时候为什么不需要指定内存大小 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%89%87%E4%B8%8ACAN%E5%A4%96%E8%AE%BE%E7%9A%84%E5%8A%9F%E8%83%BD%E6%A6%82%E8%BF%B0"><span class="nav-number">1.</span> <span class="nav-text">片上CAN外设的功能概述</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Cubemx%E9%85%8D%E7%BD%AE"><span class="nav-number">2.</span> <span class="nav-text">Cubemx配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CAN%E6%A8%A1%E5%9D%97%E7%9A%84%E6%B5%8B%E8%AF%95%E6%A8%A1%E5%BC%8F"><span class="nav-number">3.</span> <span class="nav-text">CAN模块的测试模式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CAN%E6%A8%A1%E5%9D%97%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF%E7%9B%B8%E5%85%B3%E7%9A%84%E5%87%BD%E6%95%B0"><span class="nav-number">4.</span> <span class="nav-text">CAN模块发送消息相关的函数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CAN%E6%A8%A1%E5%9D%97%E6%B6%88%E6%81%AF%E6%8E%A5%E6%94%B6%E7%9B%B8%E5%85%B3%E7%9A%84%E5%87%BD%E6%95%B0"><span class="nav-number">5.</span> <span class="nav-text">CAN模块消息接收相关的函数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%A0%87%E8%AF%86%E7%AC%A6%E7%AD%9B%E9%80%89%E5%8E%9F%E7%90%86"><span class="nav-number">6.</span> <span class="nav-text">标识符筛选原理</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%AD%E6%96%AD%E5%8F%8A%E5%85%B6%E5%A4%84%E7%90%86"><span class="nav-number">7.</span> <span class="nav-text">中断及其处理</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">xudonglei</p>
  <div class="site-description" itemprop="description">搬砖 嵌入式</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">283</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">19</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">67</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xudonglei</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'BT0Qw9HcTpPv1a6cT1iDBXKz-gzGzoHsz',
      appKey     : 'LMCMh8v02JTMFAwKNRcgoizI',
      placeholder: "Just go go",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : 'zh-CN' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
